package bz.ziro.kanbe.controller.mng.page;

import java.util.logging.Logger;
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import bz.ziro.kanbe.logic.PageTreeLogic;

/**
 * ツリーの更新
 **/
public class UpdateTreeController extends Controller {

    @SuppressWarnings("unused")
    private static final Logger logger = Logger.getLogger(UpdateTreeController.class.getName());

    @Override
    public Navigation run() {
        String siteKeyBuf = (String)sessionScope("siteKey");
        String xmlData = requestScope("data");
        
        //ツリーの情報をXMLを元に更新
        PageTreeLogic.updateTree(Long.valueOf(siteKeyBuf),xmlData);
        return null;
    }
}
